#ifndef PRINTHANDLER_H
#define PRINTHANDLER_H

#include <QObject>
#include <QTableWidget>
#include <QPainter>
#include <QtPrintSupport/QPrinter>
#include <QtPrintSupport/QPrintDialog>
#include <QFileInfo>
#include <QFileDialog>
#include <QtPrintSupport/QPrintPreviewDialog>
#include <QtPrintSupport/QPageSetupDialog>
#include <QtPrintSupport/QPrintDialog>
#include <QWebEngineView>
#include <QShortcut>
#include <QEventLoop>
#include <QDebug>

class PrintHandler : public QObject
{
    Q_OBJECT
public:
    explicit PrintHandler(QObject *parent = nullptr);


    void printDocument(QPrinter *printer);
    void setPage(QWebEnginePage* page);

private:
   QWebEnginePage *m_page;
   bool m_inPrintPreview = false;
signals:

public slots:
   void printPreview();
   void print();
};

#endif // PRINTHANDLER_H
